<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>Nestify</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="icon" type="image/x-icon" href="../images/favicon.ico">
	      <link rel="stylesheet" href="../styles/style.css">
    </head>
    <body>

        <div class="navbar navbar-default navbar-fixed-top visible-xs">
            <a href="../" class="navbar-brand">Nestify</a>
            <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
        </div>

        <div class="xs-menu menu" id="mobile-menu">
                <div id="book-search-input" role="search"><input type="text" placeholder="请输入查询关键字"></div>            <compodoc-menu></compodoc-menu>
        </div>

        <div class="container-fluid main">
           <div class="row main">
               <div class="hidden-xs menu">
                   <compodoc-menu mode="normal"></compodoc-menu>
               </div>
               <!-- START CONTENT -->
               <div class="content miscellaneous-variables">
                   <div class="content-data">















<ol class="breadcrumb">
  <li>其他</li>
  <li>变量</li>
</ol>

<section>
    <h3 id="index">索引</h3>
    <table class="table table-sm table-bordered index-table">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <ul class="index-list">
                        <li>
                            <a href="#cellsMap" title="server/src/common/entities/content.entity.ts"><b>cellsMap</b>&nbsp;&nbsp;&nbsp;(server/.../content.entity.ts)</a>
                        </li>
                        <li>
                            <a href="#config" title="server/src/config/index.ts"><b>config</b>&nbsp;&nbsp;&nbsp;(server/.../index.ts)</a>
                        </li>
                        <li>
                            <a href="#CurrentUser" title="server/src/common/aspects/decorator.ts"><b>CurrentUser</b>&nbsp;&nbsp;&nbsp;(server/.../decorator.ts)</a>
                        </li>
                        <li>
                            <a href="#es" title="server/src/common/lib/elastic-search.ts"><b>es</b>&nbsp;&nbsp;&nbsp;(server/.../elastic-search.ts)</a>
                        </li>
                        <li>
                            <a href="#handleType" title="server/src/common/entities/content.entity.ts"><b>handleType</b>&nbsp;&nbsp;&nbsp;(server/.../content.entity.ts)</a>
                        </li>
                        <li>
                            <a href="#influx" title="server/src/common/lib/influx.ts"><b>influx</b>&nbsp;&nbsp;&nbsp;(server/.../influx.ts)</a>
                        </li>
                        <li>
                            <a href="#logger" title="server/src/common/lib/logger.ts"><b>logger</b>&nbsp;&nbsp;&nbsp;(server/.../logger.ts)</a>
                        </li>
                        <li>
                            <a href="#module" title="server/src/main.ts"><b>module</b>&nbsp;&nbsp;&nbsp;(server/.../main.ts)</a>
                        </li>
                        <li>
                            <a href="#readFileAsync" title="server/src/main.ts"><b>readFileAsync</b>&nbsp;&nbsp;&nbsp;(server/.../main.ts)</a>
                        </li>
                        <li>
                            <a href="#rowsMap" title="server/src/common/entities/content.entity.ts"><b>rowsMap</b>&nbsp;&nbsp;&nbsp;(server/.../content.entity.ts)</a>
                        </li>
                        <li>
                            <a href="#toGetMenuIndex" title="server/src/ssr/controllers/index.controller.ts"><b>toGetMenuIndex</b>&nbsp;&nbsp;&nbsp;(server/.../index.controller.ts)</a>
                        </li>
                    </ul>
                </td>
            </tr>
        </tbody>
    </table>
</section>

    <h3>server/src/common/entities/content.entity.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="cellsMap"></a>
                        <span class="name">
                            <b>
                            cellsMap</b>
                            <a href="#cellsMap"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>类型 : </i>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object" target="_blank" >object</a></code>

                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>{
    标题: &#x27;title&#x27;,
    作者: &#x27;author&#x27;,
    来源: &#x27;source&#x27;,
    地址: &#x27;address&#x27;,
    排序: &#x27;sort&#x27;,
    发布时间: &#x27;publish_at&#x27;,
    正文: &#x27;text&#x27;,
    图片: &#x27;thumbnail&#x27;,
    视频: &#x27;video&#x27;
}</code>
                        </td>
                    </tr>


            </tbody>
        </table>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="handleType"></a>
                        <span class="name">
                            <b>
                            handleType</b>
                            <a href="#handleType"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>ExcelHandleType.ARRAY</code>
                        </td>
                    </tr>


            </tbody>
        </table>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="rowsMap"></a>
                        <span class="name">
                            <b>
                            rowsMap</b>
                            <a href="#rowsMap"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>类型 : </i>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object" target="_blank" >object</a></code>

                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>{
    id: {
        header: &#x27;编号&#x27;
    },
    title: {
        header: &#x27;标题&#x27;
    },
    author: {
        header: &#x27;作者&#x27;
    },
    source: {
        header: &#x27;来源&#x27;
    },
    address: {
        header: &#x27;地址&#x27;
    },
    sort: {
        header: &#x27;排序&#x27;
    },
    thumbnailPath: {
        header: &#x27;图片&#x27;,
        key: &#x27;thumbnail&#x27;,
        handler: (val) &#x3D;&gt; Content.getFullPath(val)
    },
    videoPath: {
        header: &#x27;视频&#x27;,
        key: &#x27;video&#x27;,
        handler: (val) &#x3D;&gt; Content.getFullPath(val)
    },
    summary: {
        header: &#x27;摘要&#x27;
    },
    text: {
        header: &#x27;正文&#x27;
    },
    views: {
        header: &#x27;浏览量&#x27;
    },
    publish_at: {
        header: &#x27;发布时间&#x27;,
        handler: (val) &#x3D;&gt; (val ? moment(val).format(&#x27;YYYY-MM-DD HH:mm:ss&#x27;) : &#x27;&#x27;)
    },
    update_at: {
        header: &#x27;修改时间&#x27;,
        handler: (val) &#x3D;&gt; (val ? moment(val).format(&#x27;YYYY-MM-DD HH:mm:ss&#x27;) : &#x27;&#x27;)
    },
    category: {
        header: &#x27;分类&#x27;,
        handler: (val) &#x3D;&gt; (val ? val.name : &#x27;&#x27;)
    }
}</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/config/index.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="config"></a>
                        <span class="name">
                            <b>
                            config</b>
                            <a href="#config"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>类型 : </i>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object" target="_blank" >object</a></code>

                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>{
    port: 3000,
    hostName: &#x27;0.0.0.0&#x27;,
    serverUrl: &#x27;http://127.0.0.1:3000&#x27;,

    static: {
        root: &#x27;static&#x27;,
        prefix: &#x27;/static/&#x27;,
        uploadPath: &#x27;/uploads&#x27;
    },

    jwt: {
        secretOrPrivateKey: &#x27;secretKey&#x27;,
        signOptions: {
            expiresIn: 360000
        }
    },

    cache: {
        ttl: 10,
        max: 1000
    },

    redis: {
        host: &#x27;127.0.0.1&#x27;,
        port: 6379
    },

    session: {
        secret: &#x27;some-secret-password-at-least-32-characters-long&#x27;,
        cookie: {
            maxAge: 1000 * 60 * 60 * 3,
            secure: false
        }
    },

    orm: {
        type: &#x27;postgres&#x27;,
        host: &#x27;127.0.0.1&#x27;,
        port: 5432,
        database: &#x27;nestify&#x27;,
        username: &#x27;nestify&#x27;,
        password: &#x27;123456&#x27;,
        dropSchema: false,
        synchronize: false,
        logging: false,
        entities: [resolve(&#x27;./**/*.entity.ts&#x27;)]
    },

    influx: {
        host: &#x27;127.0.0.1&#x27;,
        database: &#x27;nestify&#x27;,
        schema: [
            {
                measurement: &#x27;system_status&#x27;,
                fields: {
                    cpu: Influx.FieldType.FLOAT,
                    memory: Influx.FieldType.INTEGER,
                    ppid: Influx.FieldType.INTEGER,
                    pid: Influx.FieldType.INTEGER,
                    ctime: Influx.FieldType.INTEGER,
                    elapsed: Influx.FieldType.INTEGER,
                    timestamp: Influx.FieldType.INTEGER
                },
                tags: [&#x27;status&#x27;]
            }
        ]
    },

    websocket: {
        port: 9000
    },

    es: {
        host: &#x27;127.0.0.1:9200&#x27;,
        log: &#x27;trace&#x27;
    }
}</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/common/aspects/decorator.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="CurrentUser"></a>
                        <span class="name">
                            <b>
                            CurrentUser</b>
                            <a href="#CurrentUser"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>createParamDecorator(async (param, request) &#x3D;&gt; {
	return !param ? request.user : request.user[param];
})</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/common/lib/elastic-search.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="es"></a>
                        <span class="name">
                            <b>
                            es</b>
                            <a href="#es"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>new elasticsearch.Client({
    ...config.es,
    log: Logger
})</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/common/lib/influx.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="influx"></a>
                        <span class="name">
                            <b>
                            influx</b>
                            <a href="#influx"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>new Influx.InfluxDB(config.influx)</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/common/lib/logger.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="logger"></a>
                        <span class="name">
                            <b>
                            logger</b>
                            <a href="#logger"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>Log4js.getLogger()</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/main.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="module"></a>
                        <span class="name">
                            <b>
                            module</b>
                            <a href="#module"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>类型 : </i>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

                        </td>
                    </tr>


            </tbody>
        </table>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="readFileAsync"></a>
                        <span class="name">
                            <b>
                            readFileAsync</b>
                            <a href="#readFileAsync"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>util.promisify(fs.readFile)</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>
    <h3>server/src/ssr/controllers/index.controller.ts</h3>
    <section>
    <h3></h3>        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
                        <a name="toGetMenuIndex"></a>
                        <span class="name">
                            <b>
                            toGetMenuIndex</b>
                            <a href="#toGetMenuIndex"><span class="icon ion-ios-link"></span></a>
                        </span>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                            <i>缺省值 : </i><code>(menus, asPath) &#x3D;&gt; {
	let path &#x3D; asPath.split(&#x27;?&#x27;).shift().split(&#x27;/&#x27;).pop();
	let index &#x3D; 0;
	let order &#x3D; 0;
	menus.forEach((menu, i) &#x3D;&gt; {
		if (menu.children &amp;&amp; menu.children.length &gt; 0) {
			menu.children.forEach((item, j) &#x3D;&gt; {
				if (path &#x3D;&#x3D;&#x3D; item.url.split(&#x27;/&#x27;).pop()) {
					index &#x3D; i;
					order &#x3D; j;
				}
			})
		}
	});
	return {
		menu_show: menus[index],
		order
	};
}</code>
                        </td>
                    </tr>


            </tbody>
        </table>
</section>



                   </div><div class="search-results">
    <div class="has-results">
        <h1 class="search-results-title"><span class='search-results-count'></span> result-matching "<span class='search-query'></span>"</h1>
        <ul class="search-results-list"></ul>
    </div>
    <div class="no-results">
        <h1 class="search-results-title">无匹配的结果 "<span class='search-query'></span>"</h1>
    </div>
</div>
</div>
               <!-- END CONTENT -->
           </div>
       </div>

       <script>
            var COMPODOC_CURRENT_PAGE_DEPTH = 1;
            var COMPODOC_CURRENT_PAGE_CONTEXT = 'miscellaneous-variables';
            var COMPODOC_CURRENT_PAGE_URL = 'variables.html';
       </script>

       <script src="../js/libs/custom-elements.min.js"></script>
       <script src="../js/libs/lit-html.js"></script>
       <!-- Required to polyfill modern browsers as code is ES5 for IE... -->
       <script src="../js/libs/custom-elements-es5-adapter.js" charset="utf-8" defer></script>
       <script src="../js/menu-wc.js" defer></script>

       <script src="../js/libs/bootstrap-native.js"></script>

       <script src="../js/libs/es6-shim.min.js"></script>
       <script src="../js/libs/EventDispatcher.js"></script>
       <script src="../js/libs/promise.min.js"></script>
       <script src="../js/libs/zepto.min.js"></script>

       <script src="../js/compodoc.js"></script>

       <script src="../js/tabs.js"></script>
       <script src="../js/menu.js"></script>
       <script src="../js/libs/clipboard.min.js"></script>
       <script src="../js/libs/prism.js"></script>
       <script src="../js/sourceCode.js"></script>
          <script src="../js/search/search.js"></script>
          <script src="../js/search/lunr.min.js"></script>
          <script src="../js/search/search-lunr.js"></script>
          <script src="../js/search/search_index.js"></script>
       <script src="../js/lazy-load-graphs.js"></script>


    </body>
</html>
